package org.example.design.exerciseold.dependencyinvert;

/**
 * @Auther: lingshi
 * @Date: 2020/5/8 10:12
 * @Description:
 */
public class Tom {

    //    public  void studyJava(){
//        System.out.println("Tom 开始学习java");
//    }
//    public  void studyPython(){
//        System.out.println("Tom 开始学习Python");
//    }
//    public  void studyAi(){
//        System.out.println("Tom 开始学习AI");
//    }

    private StudyService stu;
    public Tom() {
    }

    public Tom(StudyService STU) {
        STU.study();
    }

    public void setStudyTomImpl(StudyService stu) {
        this.stu = stu;
    }

    public void TomStudy(){
        stu.study();
    }

}
